<!-- Main content -->
<div class="wrapper">
	<!-- Table with checkboxes -->
	<div class="widget">
		<div class="tablePars">
			<form id="search_form" action="<?php echo BASE_URL;?>role/index" method="get">
				<div class="dataTables_filter">
					<label><span>Search:</span> <input type="text" name="keywords" value="<?php echo $keywords;?>" placeholder="权限名称">
					<div class="srch hand"></div></label>
				</div>
			</form>
			<?php if (!empty($keywords)):?>
			<a href="<?php echo BASE_URL;?>role/index"><span class="icos-arrowleft tipS" title="返回" style="margin:20px 0 0 5px"></span></a>
			<?php endif;?>
		</div>
		<div class="clear"></div>
		
		<div class="whead">
			<h6>权限列表</h6>
			<div class="clear"></div>
		</div>
		<table cellpadding="0" cellspacing="0" width="100%" class="tDefault">
			<thead>
				<tr>
					<td>权限名称</td>
					<td>操作</td>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="6">
						<div class="tPages">
						<?php if (!empty($pages)):?>
							<?php $this->widget('MCLinkPager', array('pages' => $pages));?>
						<?php endif;?>
						</div>
					</td>
				</tr>
			</tfoot>
			<tbody>
			<?php if (!empty($res)):?>
			<?php foreach ($res as $item):?>
				<tr>
					<td class="tableActs"><?php echo CHtml::encode($item['role_name']);?></td>
					<td class="tableActs">
						<?php if ($this->checkRights(Yii::app()->user->act_rights, 'role', 'index')):?>
                    	<a href="<?php echo BASE_URL;?>role/index/preViewRole/1/role_id/<?php echo $item['role_id'];?>" class="buttonSS bDefault tipS preview_role" title="查看"><span class="icos-preview"></span></a>
                    	<?php endif;?>
                    	<?php if ($this->checkRights(Yii::app()->user->act_rights, 'role', 'edit')):?>
                    	<a href="<?php echo BASE_URL;?>role/edit/role_id/<?php echo $item['role_id'];?>" class="buttonSS bDefault tipS edit_role" title="编辑"><span class="icos-pencil"></span></a>
                    	<?php endif;?>
                    	<?php if ($this->checkRights(Yii::app()->user->act_rights, 'role', 'del')):?>
						<a href="<?php echo BASE_URL;?>role/del/role_id/<?php echo $item['role_id'];?>" class="buttonSS bDefault tipS del" title="删除"><span class="icos-cross"></span></a>
						<?php endif;?>
						<!-- <a href="#" class="tablectrl_small bDefault" title="Options"><span class="icos-cog3 nomargin nopadding"></span></a> -->
					</td>
				</tr>
			<?php endforeach;?>
			<?php endif;?>
			</tbody>
		</table>

	</div>
</div>
<!-- Main content ends -->